#ifndef _OPENGL_H_
#define _OPENGL_H_

#include "Camera.h"
#include <windows.h>
#include <gl\gl.h>
#include <gl\glu.h>
#include "Map.h"
#include "Boid.h"
#include <list>

using namespace std;

/**
Used to use OpenGL in a more object way
*/
class OpenGL
{
public:
	static void Init(int width, int height, Map& map, list<Boid*>* spheres);
	static void Resize(int width, int height, bool changeTexture = true);
	static void Render(void);
	static void Destroy(void);	
	static Camera& GetCamera(void);
	static void SetCamera(Camera& camera);
	static void UpdateCamera(float time);

private:
	static Camera camera;	
	static int width, height;
	static list<Boid*>* spheres;

	static unsigned int PrepareMap(Map& map);
	static unsigned int PrepareSphere(float radius);
	static unsigned int PrepareSkyBox();
	static unsigned int mapIndex, sphereIndex, skyBoxIndex;
};

#endif